﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Net5ApiANdWpfClient.Lib.Model
{
    public class ResultModel
    {
        /// <summary>
        /// 返回编码
        /// </summary>
        public ResultCode code { get; set; }
        /// <summary>
        /// 返回信息
        /// </summary>
        public string mess { get; set; }
        /// <summary>
        /// 返回数据
        /// </summary>
        public dynamic data { get; set; }
    }


    /// <summary>
    /// 接口执行状态码
    /// </summary>
    public enum ResultCode
    {
        /// <summary>
        /// 成功
        /// </summary>
        Ok = 20000,
        /// <summary>
        /// 失败
        /// </summary>
        Fail = 2,
        /// <summary>
        /// 错误
        /// </summary>
        Error = 3,

        /// <summary>
        /// 没有登录
        /// </summary>
        NoLogin = 50008,

        /// <summary>
        /// 没有授权
        /// </summary>
        NoAuthorization = 50012
    }
}
